<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class BaseModel</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> BaseModel</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|													<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">BaseModelクラス</p>
<p class="description"><p>各モデルのスーパークラス。  以下のような処理を受け持つ。 <ul><li>DBへの接続</li><li>SQLの実行、返却</li></ul></p></p>
	<ul class="tags">
				<li><span class="field">author:</span> M.Katsube &lt;<a href="mailto:">katsubemakito@gmail.com   katsubemakito@gmail.com</a>&gt;</li>
				<li><span class="field">copyright:</span> 2010 WingPHP</li>
				<li><span class="field">access:</span> public</li>
				<li><span class="field">license:</span> The</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_model---base.php.html">/model/base.php</a> (line <span class="field">40</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../media/images/Class.png"
								 alt=" class"
								 title=" class"
								 style="vertical-align: center"/>
						<a href="../QueryModel/QueryModel.html">QueryModel</a>
					</td>
					<td>
											QueryModelクラス
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../media/images/Class.png"
								 alt=" class"
								 title=" class"
								 style="vertical-align: center"/>
						<a href="../QueryModel/SessionModel.html">SessionModel</a>
					</td>
					<td>
											SessionModelクラス
										</td>
				</tr>
							</table>
		</div>
	</div>



	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																								<div class="method-definition">
					<img src="../media/images/Constructor.png" alt=" "/>
											<span class="method-result">BaseModel</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Destructor.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#__destruct" title="details" class="method-name">__destruct</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#exec" title="details" class="method-name">exec</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$bind</span> = <span class="var-default">array()</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$is_tra</span> = <span class="var-default">true</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#makeUpdateSet" title="details" class="method-name">makeUpdateSet</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$arr</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#makeUpdateSetBind" title="details" class="method-name">makeUpdateSetBind</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$arr</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#select" title="details" class="method-name">select</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$bind</span> = <span class="var-default">array()</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#select1" title="details" class="method-name">select1</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$bind</span> = <span class="var-default">array()</span>])
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
													<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">51</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">コンストラクタ</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">BaseModel</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../QueryModel/QueryModel.html#method__construct">QueryModel::__construct()</a>
								: コンストラクタ
							</li>
					<li>
				<a href="../QueryModel/SessionModel.html#method__construct">SessionModel::__construct()</a>
								: コンストラクタ
							</li>
				</ul>
	</div>
<a name="method__destruct" id="__destruct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Destructor.png" />
		<span class="method-title">Destructor __destruct</span> (line <span class="line-number">60</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">デストラクタ</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__destruct
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../QueryModel/QueryModel.html#method__destruct">QueryModel::__destruct()</a>
								: デストラクタ
							</li>
					<li>
				<a href="../QueryModel/SessionModel.html#method__destruct">SessionModel::__destruct()</a>
								: デストラクタ
							</li>
				</ul>
	</div>
<a name="methodexec" id="exec"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">exec</span> (line <span class="line-number">123</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">UPDATE,INSERT,DELETE句実行</p>
<p class="description"><p>データ更新系のSQLを実行する。</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			exec
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$bind</span> = <span class="var-default">array()</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$is_tra</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sql</span><span class="var-description">: SQL文を直書き。</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$bind</span><span class="var-description">: SQL文内でプレースホルダを利用して                         いる場合は配列で渡す。順番考慮。</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$is_tra</span><span class="var-description">: トランザクションを利用する場合はtrue</span>			</li>
				</ul>
		
			
	</div>
<a name="methodmakeUpdateSet" id="makeUpdateSet"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">makeUpdateSet</span> (line <span class="line-number">164</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">UPDATE句のsetを作成</p>
<p class="description"><p>プレースホルダを考慮しupdate句のset部分を作成する。</p><p>Example.<div class="src-code"><ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-var">$ret&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../BaseModel/BaseModel.html#methodmakeUpdateSet">makeUpdateSet</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">,&nbsp;</span><span class="src-str">'age'&nbsp;&nbsp;</span>=&gt;&nbsp;<span class="src-num">19</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">,&nbsp;</span><span class="src-str">'addr'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'松江'</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;$ret&nbsp;===&nbsp;'name=?,&nbsp;age=?,&nbsp;addr=?'</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			makeUpdateSet
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$arr</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$arr</span><span class="var-description">: key-value</span>			</li>
				</ul>
		
			
	</div>
<a name="methodmakeUpdateSetBind" id="makeUpdateSetBind"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">makeUpdateSetBind</span> (line <span class="line-number">189</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">UPDATE句のプレースホルダ用の配列を作成</p>
<p class="description"><p>Example.<div class="src-code"><ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-var">$ret&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../BaseModel/BaseModel.html#methodmakeUpdateSetBind">makeUpdateSetBind</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">,&nbsp;</span><span class="src-str">'age'&nbsp;&nbsp;</span>=&gt;&nbsp;<span class="src-num">19</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">,&nbsp;</span><span class="src-str">'addr'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'松江'</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;$ret&nbsp;===&nbsp;array('foo',19,'松枝')</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			makeUpdateSetBind
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$arr</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$arr</span><span class="var-description">: key-value</span>			</li>
				</ul>
		
			
	</div>
<a name="methodselect" id="select"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">select</span> (line <span class="line-number">92</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">SELECT句実行 全返却</p>
<p class="description"><p>指定されたSELECT句を実行し、結果のすべて返却する。    ※巨大なデータになることが予測される場合は      必ずoffsetなどを利用すること。</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> array(                      array(col1=&gt;'foo', col2=&gt;'bar')                    , array(col1=&gt;'hoge',col2=&gt;'fuga')  )</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			select
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$bind</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sql</span><span class="var-description">: SQL文を直書き。</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$bind</span><span class="var-description">: SQL文内でプレースホルダを利用して                        いる場合は配列で渡す。順番考慮。</span>			</li>
				</ul>
		
			
	</div>
<a name="methodselect1" id="select1"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">select1</span> (line <span class="line-number">107</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">SELECT句実行 一件返却</p>
<p class="description"><p>指定されたSELECT句を実行し、結果の最初の1行目を返却する。</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> array(col1=&gt;'foo', col2=&gt;'bar')</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			select1
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$bind</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sql</span><span class="var-description">: SQL文を直書き。</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$bind</span><span class="var-description">: SQL文内でプレースホルダを利用して                        いる場合は配列で渡す。順番考慮。</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Wed, 04 Aug 2010 16:50:05 +0900 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>